package com.zhuangwei;

import com.google.common.collect.Maps;
import de.codecentric.boot.admin.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
import java.util.concurrent.ConcurrentMap;

/**
 * @author LeviCoder
 * @create 2019-01-27 23:20
 */
@SpringBootApplication
@EnableAdminServer //开启管控台
@RestController
public class SpringBootAdmin
{
    public static void main(String[] args)
    {
        SpringApplication.run(SpringBootAdmin.class,args);
    }

    @GetMapping("/")
    public Map index(){
        ConcurrentMap<Object, Object> ret = Maps.newConcurrentMap();
        ret.put("msg", "Hello Spring Boot Admin");
        return ret;
    }
}
